home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
glass
/
glass.lha
/
GLASS
/
dtm
/
tmcode.ct
< prev
next >
Wrap
Text File
|
1991-06-18
|
930b
|
48 lines
.. file: tmcode.ct
/* file: tmcode.c
template file: tmcode.ct
datastructure file: ${dsfilename}
tm version: $(tmvers) ($(tmdate))
*/
.insert dtmconfig.t
/* Standard UNIX libraries */
#include <stdio.h>
/* Standard tm library */
#include <tmc.h>
#include <cvr.h>
/* Local definitions */
#include "dtmconfig.h"
#include "tmcode.h"
#include "dtmconst.h"
static int fscan_bool (f, s)
FILE *f;
bool *s;
{ char buf[BUFSZ];
if (fscanf (f, " %s", buf) != 1)
{ (void) strcpy (tmerrmsg, "boolean expected");
return (1);
};
if (strcmp (buf, FALSESTR) == 0)
{ *s = FALSE;
return (0);
};
if (strcmp (buf, TRUESTR) == 0)
{ *s = TRUE;
return (0);
};
(void) strcpy (tmerrmsg, "boolean expected");
return (1);
};
static void fprint_bool (f, s)
FILE *f;
bool s;
{ fprintf (f, s?TRUESTR:FALSESTR);
};
.include $(libpath)$(pathsep)calu.ct